Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: Create Outlook object with LotusScript
~Naomi Minhipitheroni 22.May.03 07:36 PM a Web browser
Domino Designer All Releases Windows 2000


Thank you both, but this doesn't work for me.

I had tried the set outlook = GetObject("","Outlook.Application") line already and this failed with error cannot create automation object when outlook is running.
The main Outlook window closes when using Outlook.Application.Quit, but the task outlook.exe stays in the task manager and that raises the error.
So i have to find a way to realy kill outlook :-) or to hook on the thread that is residend in the memory.

More suggestions?

This is a piece of code i tried:


Sub Initialize
Dim Outlook As Variant
Dim myNameSpace As Variant
Dim objSession As Variant
Dim objAddressList As Variant
Dim Contact As Variant
Dim objField As Variant
Const CdoPR_EMS_AB_PROXY_ADDRESSES = &H800F101E

On Error Goto Cleanup

Set Outlook = Nothing
Set myNameSpace = Nothing
Set objSession = Nothing
Set objAddressList = Nothing
Set Contact = Nothing
Set objField = Nothing

On Error Resume Next
Set Outlook = GetObject( "","Outlook.Application")
If Err > 0 Then
Msgbox Error
On Error Goto Cleanup
Set Outlook = CreateObject("Outlook.Application")
End If


Set myNameSpace = Outlook.GetNameSpace("MAPI")
Set objSession = Outlook.CreateObject("MAPI.Session")
objSession.Logon "Microsoft Outlook Internet Settings"
Set objAddressList = objSession.AddressLists("Outlook Address Book")

...........

Cleanup:
If Err > 0 Then
Msgbox Err & ": " & Error
End If
' objSession.Logoff
Outlook.Quit
Outlook.Application.Quit
Set Outlook = Nothing
Set myNameSpace = Nothing
Set objSession = Nothing
Set objAddressList = Nothing
Set Contact = Nothing
Set objField = Nothing
Exit Sub
Resume

End Sub


Thanks,

Marcel.




Create Outlook object with LotusScr... (~Naomi Minhipit... 21.May.03)
. . RE: Create Outlook object with Lotu... (~Wendy Minboosi... 22.May.03)
. . RE: Create Outlook object with Lotu... (~Samuel Dwofana... 7.Jul.03)
. . RE: Create Outlook object with Lotu... (~Keiko Quetaber... 22.May.03)
. . . . RE: Create Outlook object with Lotu... (~Naomi Minhipit... 22.May.03)
. . . . . . RE: Create Outlook object with Lotu... (~Samuel Dwofana... 9.Jul.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS